import BaseApi from '../BaseApi';

const controller = "/truckSpace";

export default {

    list(condition) {
        return this.requestGet(controller, "/list", condition);
    },
    addTruckSpace(condition) {
        return this.requestPost(controller, "/addTruckSpace", condition);
    },
    updateTruckSpace(condition) {
        return this.requestPost(controller, "/updateTruckSpace", condition);
    },
    delTruckSpace(condition) {
        let id = condition.id;
        return this.requestGet(controller, "/delTruckSpace/" + id);
    },

    /*请求封装*/
    requestPost(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestPost(newUrl, condition);

    },
    requestGet(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestGet(newUrl, condition);
    },


}
